package com.zggk.framework.utils.assets;

public class BridgeConvertUtils {
	private static String trafficControlMeasureCode = "";// 交通管制措施代码
	private static String chargePropertyCode = "";//收费性质代码
	private static String manageUnitPropertyCode = "";//管养单位性质代码
	private static String pierProtectionType = "";//墩台防撞设施类型
	private static String navigationGrade = "";//通航等级
	private static String maintainType = "";//养护类型
	/**
	 * 
	 * @Description 交通管制措施代码转换
	 * @author 尹强[yinqiang] Email:changetogther@163.com Tel:18181725967
	 * @param
	 * @return
	 * @createDate 2018年5月19日 上午10:46:36
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public static String convertTrafficControlMeasure(String tcm){
		
		if("正常使用".equals(tcm)){
			trafficControlMeasureCode = "1";
		}else if("限制交通".equals(tcm)){
			trafficControlMeasureCode = "2";
		}else if("封闭交通".equals(tcm)){
			trafficControlMeasureCode = "3";
		}else if("废弃".equals(tcm)){
			trafficControlMeasureCode = "4";
		}
		return trafficControlMeasureCode;
		
	}
	/**
	 * 
	 * @Description 收费性质代码转换
	 * @author 尹强[yinqiang] Email:changetogther@163.com Tel:18181725967
	 * @param
	 * @return
	 * @createDate 2018年5月19日 上午10:48:25
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public static String convertChargePropertyCode(String cpc){
			
			if("非收费".equals(cpc)){
				trafficControlMeasureCode = "1";
			}else if("还贷".equals(cpc)){
				trafficControlMeasureCode = "2";
			}else if("经营".equals(cpc)){
				trafficControlMeasureCode = "3";
			}
			return chargePropertyCode;
			
		}
	/**
	 * 
	 * @Description 养护类型
	 * @author 尹强[yinqiang] Email:2259441906@qq.com Tel:18181725967
	 * @param
	 * @return
	 * @createDate 2018年5月31日 下午1:33:24
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
		public static String convertMaintainType(String mt){
			
			if(mt.indexOf("中修")!=-1){
				maintainType = "2";
			}else if(mt.indexOf("大修")!=-1){
				maintainType = "3";
			}else if(mt.indexOf("改建")!=-1){
				maintainType = "4";
			}else if(mt.indexOf("小修")!=-1) {
				maintainType = "0";
			}else if("预防性养护".equals(mt)) {
				maintainType = "1";
			}
			return maintainType;
			
		}
		/**
		 * 
		 * @Description 墩台防撞设施类型
		 * @author 尹强[yinqiang] Email:changetogther@163.com Tel:18181725967
		 * @param
		 * @return
		 * @createDate 2018年5月19日 上午10:54:50
		 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
		 */
	public static String convertPierProtectionType(String ppt){
				
				if("软防护".equals(ppt)){
					pierProtectionType = "1";
				}else if("硬防护".equals(ppt)){
					pierProtectionType = "2";
				}else if("无防护".equals(ppt)){
					pierProtectionType = "3";
				}
				return pierProtectionType;
				
			}
	/**
	 * 
	 * @Description 通航等级转换
	 * @author 尹强[yinqiang] Email:changetogther@163.com Tel:18181725967
	 * @param
	 * @return
	 * @createDate 2018年5月19日 上午10:56:39
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public static String convertNavigationGrade(String ng){
		
		if("一级".equals(ng)){
			navigationGrade = "1";
		}else if("二级".equals(ng)){
			navigationGrade = "2";
		}else if("三级".equals(ng)){
			navigationGrade = "3";
		}else if("四级".equals(ng)){
			navigationGrade = "4";
		}else if("五级".equals(ng)){
			navigationGrade = "5";
		}else if("六级".equals(ng)){
			navigationGrade = "6";
		}else if("七级".equals(ng)){
			navigationGrade = "7";
		}
		return navigationGrade;
		
	}
	
	public static String convertManageUnitPropertyCode(String mupc){
		
		if("公路交通部门养护管理".equals(mupc)){
			manageUnitPropertyCode = "1";
		}else if("公路交通部门与其他部门共同养护管理".equals(mupc)){
			manageUnitPropertyCode = "2";
		}else if("其他部门养护管理".equals(mupc)){
			manageUnitPropertyCode = "3";
		}
		return manageUnitPropertyCode;
		
	}
	
}
